package com.zhz.livegoods.buyaction.controller;

import com.zhz.livegoods.buyaction.service.BuyactionService;
import com.zhz.livegoods.commons.vo.LivegoodsResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhz
 * @date 2020/08/10
 **/
@RestController
@CrossOrigin
public class BuyactionController {
    @Autowired
    private BuyactionService buyactionService;

    /**
     * 预订房屋
     * @param id 商品主键
     * @param user 登录用户手机号
     * @return 预定结果
     */
    @GetMapping("/buyaction")
    public LivegoodsResult buyaction(String id,String user){
        return buyactionService.buyaction(id,user);
    }
}
